package com.dayaokeji.rhythmschoolstudent.client.home.course.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.dayaokeji.rhythmschoolstudent.R;
import com.dayaokeji.server_api.domain.Course;

/**
 * Created by Gorden on 2017/10/14.
 * 课程列表Adapter
 */

public class CourseListAdapter extends BaseQuickAdapter<Course,BaseViewHolder> {

    public CourseListAdapter() {
        super(R.layout.item_course_list, null);
    }

    @Override
    protected void convert(BaseViewHolder helper, Course item) {
        helper.setText(R.id.tv_title,item.getName());
        helper.setText(R.id.tv_class_room,item.getRoomName());
        helper.setText(R.id.tv_teacher_name,mContext.getString(R.string.teacher_name, item.getTeacherName()));
        helper.setText(R.id.tv_time, item.getActStartTime());
        helper.setText(R.id.tv_join_code, mContext.getString(R.string.join_code, item.getId()));


    }
}
